<template>
  <div>
    <form action="http://www.itcast.cn" @submit.prevent="fn">
      <input type="text" />

      <button>提交</button>
    </form>
  </div>
</template>

<script>
export default {
  //该vue组件的数据源
  data() {
    return {}
  },
  methods: {
    fn() {
      console.log('表单提交成功')
    },
  },
}
</script>

<style scoped></style>
